# coding: utf-8
from sqlalchemy import Column, String,Integer
from marshmallow import Schema, fields
from model.model_base import Base


class CompanyOperator(Base):
    __tablename__ = 'CompanyOperator'#公司操作员表
    openid = Column(String(128), primary_key=True, comment='微信提供openid')
    name = Column(String(50), nullable=False, comment='登陆人员姓名')
    audit_permission=Column(String(1), nullable=False, default=0,comment='审核权限（0否1是）')
    departmentid=Column(Integer, nullable=False, comment='所属部门')
    company_employee=Column(String(1), nullable=False, default=0, comment='是否为公司本部人员（0否1是）,用于判断是否具有查询各县局供电所数据的权限')


class CompanyOperatorSchema(Schema):
    openid = fields.String()
    name = fields.String()
    audit_permission = fields.String()
    departmentid = fields.Integer()
    company_employee = fields.String()


companyOperatorSchema = CompanyOperatorSchema()
